package com.sanchunhui.psc.data.respository

import com.sanchunhui.psc.data.api.DeviceApi
import com.sanchunhui.psc.data.net.RetrofitFactory
import com.sanchunhui.psc.data.protocol.AddDeviceReq
import com.sanchunhui.psc.data.protocol.ResponseInfo
import rx.Observable
import javax.inject.Inject

/**
 * @Author zyx
 * @Date 2021/8/6-14:30
 * @Dscribe
 */
class DeviceRepository @Inject constructor() {

    /*
        为⽤户增加设备
     */
    fun addDeviceForMember(token:String,mac:String,device_type_id:Int,name:String) : Observable<ResponseInfo> {
        return RetrofitFactory.instance.create(DeviceApi::class.java).addDeviceForMember(
            AddDeviceReq(token, mac, device_type_id, name)
        )
    }
}